<template>
	<view class="container">
		<web-view :src="url"></web-view>
		<!-- <view>
			<view class="head">
				<view class="logo">
					<image :src="defimg" mode=""></image>
					<text class="logo-text">智助教育</text>
				</view>
			</view>
			<view class="teacher-info-container">
				<view class="course-info">
					<text class="course-name">总复习</text>
					<view class="course-desc">
						<view class="course-desc-card" v-for="(item,index) in courseDescList" :key="index">
							{{item}}
						</view>
					</view>
				</view>
				<view class="info-container">
					<image :src="defimg" mode=""></image>
					<view class="info">
						<view class="name">田晓林</view>
						<view>指导教师:无</view>
						<view>地区：四川省成都市金堂县</view>
						<view>学校：六乡中学</view>
						<view>发布时间：2020-2-8</view>
					</view>
				</view>
			</view>
			<view class="tab">
				<view class="tabMenu" :class="[currIndex == index ? 'tabMenu_active': '']" v-for="(item,index) in tabList" :key="index" @tap="tapClick(index)">
					{{item}}
				</view>
			</view>
		</view>
		<scroll-view scroll-y="true" class="content">
			<view v-if="currIndex === 0">
				教学设计
			</view>
			<view v-if="currIndex === 1">
				课堂实录
			</view>
			<view v-if="currIndex === 2">
				教学资源
			</view>
		</scroll-view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabList: ['教学设计','课堂实录','教学资源'],
				courseDescList: ['初中数学','人教版'],
				currIndex: 0,
				url:'',
				defimg: this.defimg
			}
		},
		onLoad(e) {
		this.url=JSON.parse(decodeURIComponent(e.url));
			console.log(this.url,"===");
		},
		methods: {
			tapClick(index) {
				this.currIndex = index
			}
		}
	}
</script>

<style>
.container {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	background-color: #EEEEEE;
	display: flex;
	flex-direction: column;
}
.head {
	height: 92upx;
	display: flex;
	align-items: center;
}
.logo {
	display: flex;
	align-items: center;
	padding-left: 70upx;
}
.logo image {
	display: block;
	height: 48upx;
	width: 70upx;
	margin-right: 20upx;
}
.logo .logo-text {
	color: #00ACFE;
	font-size: 28upx;
}
.teacher-info-container {
	height: 350upx;
	background-color: #FFFFFF;
}
.course-info {
	padding: 0 30upx;
	height: 100upx;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 2upx dashed  #EEEEEE;
}
.course-info .course-name {
	font-size: 32upx;
	color: rgb(20,167,61);
}
/* 课程描述卡片 */
.course-info .course-desc {
	display: flex;
}
.course-info .course-desc .course-desc-card {
	background-color: rgb(246,170,0);
	border-radius: 4upx;
	color: #FFFFFF;
	margin-left: 10upx;
	padding: 0 4upx;
	font-size: 24upx;
}
.info-container {
	height: 250upx;
	display: flex;
	align-items: center;
	padding: 0 0 0 40upx;
}
.info-container image {
	width: 150upx;
	height: 120upx;
	margin-right: 30upx;
}
.info-container .info .name {
	color: #000000;
	font-size: 28upx;
	font-weight: bold;
}
.info-container .info view{
	font-size: 24upx;
	color: #333333;
	line-height: 1.3;
}
.tab {
	margin-top: 50upx;
	height: 80upx;
	display: flex;
	justify-content: flex-start;
	align-items: center;
	border: 2upx solid rgb(20,167,61);
}
.tabMenu {
	flex: 1;
	height: 100%;
	font-size: 32upx;
	color: rgb(20,167,61);
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: #FFFFFF;
	border-right: 2upx solid rgb(20,167,61);
}
.tabMenu:last-child {
	border: 0;
}
.tabMenu_active {
	background-color: rgb(20,167,61);
	color: #FFFFFF;
}
/* 内容区 */
.content {
	flex: 1;
	background: #FFFFFF;
}
</style>
